const { useState } = React;
const { Button, Flex, Rate, Space } = antd;

const Counter = () => {
  const [count, setCount] = useState(0);

  const increment = () => {
    setCount(count + 1);
  };

  const decrement = () => {
    setCount(count - 1);
  };

  const reset = () => {
    setCount(0);
  };

  return (
    <Space direction="vertical" align="center" style={{ padding: '24px' }}>
      <h2>Counter: {count}</h2>
      <Space size="large">
        <Button type="primary" onClick={decrement}>
          -
        </Button>
        <Button type="primary" onClick={reset}>
          Reset
        </Button>
        <Button type="primary" onClick={increment}>
          +
        </Button>
      </Space>
    </Space>
  );
};

